From: Jim Blandy Date: Tue, 4 May 1993 02:29:57 +0000 (+0000) Subject: * fileio.c (Fmake_symbolic_link): If a file already exists under X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96410 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9083124bb71c9db86e7ab2338b0aeb0dbbbb9a45;p=emacs.git * fileio.c (Fmake_symbolic_link): If a file already exists under the link's filename, delete the file which the link would replace, not the file the link would point at. --- diff --git a/src/fileio.c b/src/fileio.c index 563726d1265..7927a52d1b1 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1864,7 +1864,7 @@ This happens for interactive use with M-x.") /* If we didn't complain already, silently delete existing file. */ if (errno == EEXIST) { - unlink (XSTRING (filename)->data); + unlink (XSTRING (linkname)->data); if (0 <= symlink (XSTRING (filename)->data, XSTRING (linkname)->data)) return Qnil; }